This invention relates to an automatic programming system. More particularly, the present invention is directed to an automatic programming system for automatically creating an NC part program, executed by an NC unit, from a figure definition statement and motion definition statement prepared in an automatic programming language.
In an automatic programming apparatus for creating NC data using an automatic programming language such as APT or FAPT,
(a) a part program based on the automatic programming language is created by defining points, straight lines and circular arcs using simple symbols (this is referred to as "figure definition"), and then defining a tool path using the defined points, straight lines and circular arcs (referred to as "motion statement definition"), and
(b) the part program based on the automatic programming language is subsequently converted, by using an NC data output table, into NC data comprising NC data (EIA codes or ISO codes) in a format capable of being executed by an NC unit.
For example, in the creation of a part program for moving a tool RB along a profile comprising straight lines and circular arcs shown in FIG. 3, figure definition is performed by defining a tool starting point P.sub.1, cutting starting point P.sub.2, straight lines S.sub.1 and S.sub.2 and circular arc C.sub.1 . . . as follows:
______________________________________ PART, @ REIDAI (1) MCHN, MILL, ABS (2) P.sub.1 = x.sub.1, y.sub.1 P.sub.2 = x.sub.2, y.sub.2 P.sub.3 = x.sub.3, y.sub.3 S.sub.1 = P.sub.2, P.sub.3 (3) C.sub.3 = x.sub.4, y.sub.4, r.sub.1 (4) P.sub.5 = x.sub.5, y.sub.5 S.sub.2 = P.sub.5, C.sub.1, B (5) ______________________________________
Thereafter, by using these defined points, straight lines and circular arcs, a motion statement is defined in automatic programming language. The motion statement is described by the following and in the view of the tool path:
______________________________________ CUTTER, 0.3 (6) S0800 (7) TLLFT (8) FROM, P.sub.1 (9) RPD, TO, S.sub.1, P.sub.2 (10) FCOD, 500 (11) S.sub.1 C.sub.1 S.sub.2 . . . FINI PEND ______________________________________
When this is inputted to an automatic programming unit, the latter subsequently automatically creates and outputs NC data having an EIA code or ISO code execution format while referring to an NC data output table.
In the foregoing,
(1) instructs the start of the part program, with "REIDAI" being the header.
(2) indicates the type of NC machine. "MILL" is used in case of milling, "TURN" in case of turning, and "CUT" in case of a wire-cut electrical discharge machine. "ABS" indicates an absolute command. ("INCR" would be used for an incremental command.)
(3) signifies a straight line passing through points P.sub.2 and P.sub.3.
(4) signifies a circular arc having a center (x.sub.4,y.sub.4) and a radius r.sub.1.
(5) signifies a lower tangent line (straight line) of two tangent lines passing through point P.sub.5 and contacting the circular arc c.sub.1. In the case of the upper tangent line, the alphabetic character A would be used instead of B.
(6) represents a beam command which commands a beam diameter of 0.3 mm.
(7) represents a command which commands a spindle rotational speed of 800 (rpm).
(8) is a command for offsetting the tool to the left of the direction of movement. ("TLRGT" would be used to offset the tool to the right of the direction of movement.)
(9) is a coordinate system setting command which indicates that the starting point is P.sub.1.
(10) is a command for positioning the cutter in such a manner that the tool will contact the straight line S.sub.1 at point P.sub.2 without passing this straight line.
(11) is a velocity command indicating that the feed velocity is 500 mm/min.
Thus, according to the automatic programming method, symbols are previously attached to shape elements such as straight lines, circles and points constructing the shape of a part. These shape elements are defined (figure definition), a motion definition statement is subsequently created using the symbols attached to the shape elements, and an NC part program is created automatically using these figure and motion definition statements.
In prior art figure definition, the point, straight line and circle figure elements are defined by methods described hereinafter. In the case of a point, a variety of methods are available. For example:
(i) the coordinates of the point, namely EQU P.sub.i =x.sub.i, y.sub.i
are directly input from a keyboard to define the point; or
(ii) by using two straight lines S.sub.m and S.sub.n, EQU P.sub.i =S.sub.m, S.sub.n
is input from a keyboard to define the point as the point of intersection between the two straight lines; or
(iii) by using a straight line S.sub.m and a circular arc C.sub.n, EQU P.sub.i =S.sub.m, C.sub.n, L (or R)
is input from a keyboard to define the point as the left point of intersection (of the two points of intersection) between the straight line and the circular arc (or the right point of intersection in case of R). The point can also be defined as the point of tangency between two circular arcs. In the case of a straight line, a variety of methods are available. For example:
(i) by using two points P.sub.i, P.sub.j, EQU S.sub.m =P.sub.i, P.sub.j
is input from a keyboard to define the straight line as one passing through these two points; or
(ii) by using one point P.sub.i and a circular arc C.sub.i, EQU S.sub.m =P.sub.i, C.sub.j, A (or B)
is input from a keyboard to define the straight line as one passing through the point P.sub.i and tangent to the circular arc C.sub.j on the upper side (or the lower side in case of B); or one point and an angle .alpha. with respect to a horizontal line are input to define the straight line as one passing through the point and defining the angle .alpha. with the horizontal line. In the case of a circular arc, a variety of methods are available. For example:
(i) by using one point P.sub.i and a straight line S.sub.j, EQU C.sub.m =P.sub.i, S.sub.j
is input from a keyboard to define the circular arc as one tangent to the straight line S.sub.j and having P.sub.i as its center; or
(ii) by using three points P.sub.i, P.sub.j, P.sub.k, EQU C.sub.m =P.sub.i, P.sub.j, P.sub.k
is inputted from the keyboard to define arc as one passing through these three points. The circular arc can also be defined by specifying the center of the arc and its radius.
Thus, in the prior art, a figure definition statement is input from a keyboard using symbols attached to figure elements, thereby defining new figure elements. Consequently, figure definition is troublesome and cannot be rapidly performed.
Accordingly, an object of the present invention is to provide an automatic programming system capable of defining new figure elements without requiring an input of a figure definition statement from a keyboard and without using symbols affixed to figure elements.